//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class TableFormula: IOfficeXmlSerializableAs
    {
        private bool _array;
        private string _value;

        public void ReadXmlAs(string name, ReadContext context)
        {
            using (var c = context.Read(name))
            {
                _array = c.GetOptionalBoolean("array", false);
                _value = c.ReadString();
            }

        }

        public void WriteXmlAs(string name, WriteContext context)
        {
            using (var c = context.Write(name))
            {
                c.SetOptionalBoolean("array", _array, false);
                c.WriteString(_value);
            }

        }
    }
}
